<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>添加商家</title>
		<link rel="stylesheet" type="text/css" href="css/index.css" />
		<link rel="stylesheet" href="themes/default/default.css" />
		<script src="js/kindeditor.js"></script>
		<script src="js/jquery.js"></script>
		<script src="js/zh_CN.js"></script>
		<script>
			KindEditor.ready(function(K) {
			
			
				var editor = K.editor({
					allowFileManager : true,
					uploadJson : 'upload.action',
					fileManagerJson : 'jsp/file_manager_json.jsp'
				});
				var editor1 = K.create('textarea[name="business.bsContent"]', {
				cssPath : 'js/plugins/code/prettify.css',
				items : [
						 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright']
				});
				K('#image3').click(function() {
					editor.loadPlugin('image', function() {
						editor.plugin.imageDialog({
							showRemote : false,
							imageUrl : K('#url3').val(),
							clickFn : function(url, title, width, height, border, align) {
								K('#url3').val(url);
								editor.hideDialog();
								$("#imgs").attr("src",url);
							}
						});
					});
				});
					K('#J_selectImage').click(function() {
					editor.loadPlugin('multiimage', function() {
						editor.plugin.multiImageDialog({
							clickFn : function(urlList) {
								var div = K('#J_imageView');
								div.html('');
								var imgs ="";
								K.each(urlList, function(i, data) {
									div.append('<img width="180px"   src="' + data.url + '">');
									imgs+=data.url+",";
								});
								$("#bsimageshow").val(imgs.substring(0,imgs.length-1));
								editor.hideDialog();
							}
						});
					});
				});
			});
		</script>
	</head>
	<body style="overflow-y: visible;">
		<form action="doBusiness!saveBusiness.action" method="post">
			<table class="form-table" cellspacing="0" cellpadding="0">
				<colgroup>
					<col style="width: 20%" />
					<col style="width: 80%" />
				</colgroup>
				<tr>
					<td class="bt-xx" colspan="2">
						<img src="images/titlebar_icon.gif"/> &nbsp;添加商家 
					</td>
				</tr>
				<tr>
					<td colspan="2"></td>
				</tr>
				<tr>
					<th>
						商家名称：
					</th>
					<td>
						<input type="text" class="inputstyle1" name="business.bsName" value="熹龙国际大酒店"/>
					</td>
				</tr>
				<tr>
					<th>
						商家优惠类型： 
					</th>
					<td>
						<input type="text" class="inputstyle" name="business.bsType" />卡片类型：0会员卡 1优惠卷 2 超市卡 3免费
					</td>
				</tr>
				<tr>
					<th>
						商家地址：
					</th>
					<td>
						<input type="text" class="inputstyle1"  name="business.bsAddress" value="茂南区光华南路158号" />
					</td>
				</tr>
				<tr>
					<th>
						商家打折详情：
					</th>
					<td>
					<textarea cols="100" rows="8" style="width:700px;height:100px;visibility:hidden;" name="business.bsContent"></textarea>
					</td>
				</tr>
				<tr>
					<th>
						商家电话：
					</th>
					<td>
						<input type="text" class="inputstyle"  name="business.bsTell" value="0668-3939999" />
					</td>
				</tr>
				<tr>
					<th>
						商家LOGO显示图片：
					</th>
					<td>
					<input type="hidden" id="url3" value="" name="business.bsLogo" />
						<img id="imgs" src="images/img.png"
							style="border: 1px solid #ccc; padding: 2px; width: 80px;height: 80px;" />
						&nbsp;
						<input type="button" id="image3" value="本地上传" />
					</td>
				</tr>
				<tr>
					<th>
						口味：
					</th>
					<td>
						<input type="text" class="inputstyle"   name="business.bsTaste" value="四川口味"/>
					</td>
				</tr>
				<tr>
					<th>
						人均消费：
					</th>
					<td>
						<input type="text" class="inputstyle"  name="business.bsConsume" value="28.9"/>
					</td>
				</tr>
				<tr>
					<th>
						X：
					</th>
					<td>
						<input type="text" class="inputstyle"  name="business.bsDistanceX" />
					</td>
				</tr>
				<tr>
					<th>
						Y：
					</th>
					<td>
						<input type="text" class="inputstyle"  name="business.bsDistanceY" />
					</td>
				</tr>
				<tr>
					<th>
						环境：
					</th>
					<td>
						<input type="text" class="inputstyle"  name="business.bsEnvironmental" value="一般"/>
					</td>
				</tr>
				<tr>
					<th>
						效果：
					</th>
					<td>
						<input type="text" class="inputstyle"  name="business.bsEffect" value="一般"/>
					</td>
				</tr>
				<tr>
					<th>
						服务：
					</th>
					<td>
						<input type="text" class="inputstyle"  name="business.bsServe" value="一般"/>
					</td>
				</tr>
				<tr>
					<th>
						被赞数：
					</th>
					<td>
						<input type="text" class="inputstyle2"  name="business.isGood" value="15"/>
					</td>
				</tr>
				<tr>
					<th>
						被鄙视数：
					</th>
					<td>
						<input type="text" class="inputstyle2"  name="business.isBad" value="12"/>
					</td>
				</tr>
				<tr>
					<th>
						打分：
					</th>
					<td>
						<input type="text" class="inputstyle2"  name="business.gread" value="12"/>
					</td>
				</tr>
				<tr>
					<th>
						图片批量上传：
					</th>
					<td>
					<input type="text" id="bsimageshow" class="inputstyle"  name="business.bsimageShow"  />
					<input type="button" id="J_selectImage" value="批量上传" />
						<div id="J_imageView"  style="width: 90%"  ></div>
					</td>
				</tr>
				<tr>
					<th></th>
					<td>
						<input type="submit" class="buttonstyle" value="保存" />
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>